refactor(web): use semantic recurrence equality on open - #2742
Merged
Conversation
Replace RRULE string surgery with parsed-options comparison so serialization drift (INTERVAL=1, WKST, param/BYDAY order) no longer flips preserve→series when opening an occurrence. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Share sortedByweekday with the seed key, early-return unchanged patches, and document the editable-field whitelist. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/semantic-recurrence-equality-dea2
branch
from
August 10, 2026 20:15
f2e8531 to
9e12f19
Compare
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the #2739 RRULE string-normalization equality (
INTERVAL=1/WKSTregex surgery) with a shared semantic compare of parsed recurrence options. Opening an occurrence of a Google-style series still stayspreservewhen only serialization drifts; real weekday/freq/interval/until edits still flip toseries/single.recurrenceRulesSemanticallyEquallives next topatchGridDraftRecurrenceand comparesfreq,interval(omitted = 1), order-insensitivebyweekday,until, andcount— notdtstart/ schedule or library defaultwkst.Simplicity
One helper used by both the
useRecurrencemount effect (outer + inner guards) and adapterruleUnchanged. DeletednormalizeRecurrenceRuleand the inconsistent raw string compare. No new abstraction beyond that seam.Automated validation
bun test:webonuseRecurrence.test.ts+grid-event-draft.adapter.test.ts— 39 pass (keeps INTERVAL-omitted preserve + non-UTC UNTIL regressions; adds param-order / BYDAY-order / WKST drift + real weekday edit + adapter INTERVAL drift)bun run lint— clean for changed files (pre-existing warnings elsewhere only)Independent review
Pending fresh review after PR open.
Test plan
bun test:web packages/web/src/views/Forms/EventForm/DateControlsSection/RecurrenceSection/useRecurrence/useRecurrence.test.ts packages/web/src/events/grid-event-draft.adapter.test.tsbun run lint